import 'package:app/page/treeview/treeview_page.dart';
import 'package:app/page/ui/ui_page.dart';
import 'package:app/page/whiteboard_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_jpf_core/model/select_model.dart';
import 'package:flutter_jpf_core/util/convert_util.dart';
import 'package:flutter_jpf_core/util/data_util.dart';

class JPFRoute
{

  String name;
  String path;
  var route;

  JPFRoute(this.name,this.path,this.route);

}


class Routes{

  static Map<String, WidgetBuilder> get all {
    Map<String, WidgetBuilder> map = Map<String, WidgetBuilder>();
    for(int i=0;i<menus.length;i++){
      JPFRoute itemi = menus[i];
      map[itemi.path] = itemi.route;
    }
    return map;
  }

  static List<JPFRoute> menus = [
    JPFRoute("白板","/whiteboard",(BuildContext context) => WhiteboardPage()),
    JPFRoute("UI","/ui",(BuildContext context) => UIPage()),
    JPFRoute("多级选择", "/treeview", (BuildContext context) => TreeviewPage())

  ];

}